import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
import Home from '@/components/home.vue'
import Car from '@/components/listcar.vue'
import Me from '@/components/me.vue'
import CarDetail from '@/components/Page/DetailCar.vue'
import NewCarPage from '@/components/Page/NewCarPage.vue'
import Login from '@/components/User/LogReg/Login.vue'
import Register from '@/components/User/LogReg/Register.vue'
import UserCollect from '@/components/User/UserCollect.vue'
import UserInfo from '@/components/User/UserInfo.vue'
import ShopHome from '@/components/ShopManager/ShopHome.vue'
import AddCar from '@/components/ShopManager/Manager/AddCar.vue'
import AddCarImg from '@/components/ShopManager/Manager/AddCarImg.vue'
import ListShopCar from '@/components/ShopManager/Manager/ListShopCar.vue'
import ShopInfo from '@/components/ShopManager/Manager/ShopInfo.vue'
import AlterCar from '@/components/ShopManager/Manager/AlterCar.vue'

export default new Router({
	// mode: 'history',
	routes: [{
			path: '*',
			redirect: '/home'
		},
		{
			path: '/home',
			name: 'Home',
			component: Home
		},
		{
			path: '/car',
			name: 'Car',
			component: Car
		},
		{
			path: '/me',
			name: 'Me',
			component: Me
		},
		{
			path: '/car/cardetail',
			name: 'CarDetail',
			component: CarDetail
		},
		{
			path: '/car/newcarpage',
			name: 'NewCarPage',
			component: NewCarPage
		},
		{
			path: '/login',
			name: 'Login',
			component: Login
		},
		{
			path: '/register',
			name: 'Register',
			component: Register
		},
		{
			path: '/shophome',
			name: 'ShopHome',
			component: ShopHome
		},
		{
			path: '/shop/addcar',
			name: 'AddCar',
			component: AddCar
		},
		{
			path: '/shop/addcarimg',
			name: 'AddCarImg',
			component: AddCarImg
		},
		{
			path: '/shop/altercar',
			name: 'AlterCar',
			component: AlterCar
		},
		{
			path: '/shop/listshopcar',
			name: 'ListShopCar',
			component: ListShopCar
		},
		{
			path: '/shop/shopinfo',
			name: 'ShopInfo',
			component: ShopInfo
		},
		{
			path: '/user/collect',
			name: 'UserCollect',
			component: UserCollect
		},
		{
			path: '/user/info',
			name: 'UserInfo',
			component: UserInfo
		}
	]
})
